﻿//我要投资
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BI.CF.Model;
using BI.CF.PageList;
namespace BI.CF.IDAL
{
   public  interface InvestIDAL
    {
       /// <summary>
       /// 显示+搜索+分页（我要投资）
       /// </summary>
       /// <param name="pageindex">当前页</param>
        /// <param name="pagesize">当前页显示条数</param>
       /// <param name="huankuantype">还款方式</param>
       /// <param name="jiekuandaystar">借款期限的开始天数</param>
        /// <param name="jiekuandayend">借款期限的结束天数</param>
       /// <param name="biaotype">标的类型</param>
       /// <param name="paixu">结果的排序</param>
       /// <returns></returns>
       Pager<MemLoanModel> Invest_Show(int pageindex,int pagesize,string  huankuantype,int jiekuandaystar,int jiekuandayend,string biaotype,string paixu);
       /// <summary>
       /// 通过memtable查询user表里面的userid
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       UserrsModel Mem_select_User_ID(int id);
       /// <summary>
       /// 显示投资详情
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       MemLoanModel Memloan_Show_XiangQing(int id);
       /// <summary>
       /// 查询投资人的余额
       /// </summary>
       /// <param name="userid"></param>
       /// <returns></returns>
       MemPropertyModel Memloan_Show_Memproperty(int userid);
       /// <summary>
       /// 投资（添加）
       /// </summary>
       /// <param name="UserID">投资人</param>
       /// <param name="TouZiMoney">投资金额</param>
       /// <param name="TouZiLiXi">利率</param>
       /// <param name="TouZiStarTime">投资时间</param>
       /// <param name="MemLoanID">借款项的ID</param>
       /// <returns></returns>
       bool TouZi_Geting(int UserID,decimal TouZiMoney,string TouZiLiXi,string TouZiStarTime,int MemLoanID);
       /// <summary>
       /// 查询投资人的可用余额是否可以满足投资
       /// </summary>
       /// <param name="userid">投资人ID</param>
       /// <returns></returns>
       decimal AvailableBalance(int userid); 
    }
}
